<div class="app-container with-navbar with-tabbar" ng-controller="PreSalesInfoController">
    <div class="navbar fixed-top">
        <div class="navbar-left hide-weixin" ng-click="goBack()">
            <img class="button-icon" src="image/nav-left.png"/>
            <!-- div class="button-text">返回</div -->
        </div>
        <div class="navbar-title">
            {{product.name}}
        </div>
    </div>
    <div class="app-content">
        <!-- Photo -->
        <div class="product-flash swiper-container" ng-if="isLoaded && product">
            <div class="swiper-wrapper">
                <div class="flash-slide swiper-slide" >
                    <img class="slide-image" ng-src="{{product.cover_img}}"/>
                </div>
                <div class="flash-slide swiper-slide" ng-if="!product.cover_img">
                    <img class="slide-image" ng-src="image/default-photo.png"/>
                </div>
            </div>
            <div class="swiper-pagination" ng-if="product.photos && product.photos.length > 1"></div>
        </div>
        <!-- Info -->
        <div class="product-info" ng-if="isLoaded && product">
            <div class="info-name">
                <span style="font-size: 20px; color: #000;">{{product.name}}</span>
            </div>
            <div class="info-price" style="margin-top: 2px;">
                <span class="price-shop" ng-class="{danger: currentStock}" style="font-size: 20px; color: red;">{{product.pre_price/100| currency:"￥"}}/kg</span>
                <span class="price-market">{{product.price/100| currency:"￥"}}/kg</span>
            </div>
            <div style="color: #bbbbbb;font-size: 0.32rem;padding: 0.2rem 0 0.4rem 0;">
                <span class="block">预计重量<em> {{product.pre_weight}} </em>kg </span>
                <span class="block">预计总价<em> {{product.pre_total/100| currency:"￥"}} </em></span>
            </div>
        </div>
        <div class="product-intro" ng-if="isLoaded && product">
            <div class="intro-header">
                预售规则
            </div>
            <div class="intro-content" style="padding: 20px;">
                <p style="line-height: 30px;">1.预售总价为 预售单价X预计重量，即 {{product.pre_weight*product.pre_price/100}}元；</p>
                <p style="line-height: 30px;">2.预付款约为 预售总价的30%；</p>
                <p style="line-height: 30px;">3.尾款为 预售单价X实际重量-预付款；</p>
                <p style="line-height: 30px;">4.土猪养殖时间约为8个月，实际重量在屠宰后称重；</p>
                <p style="line-height: 30px;">5.尾款支付时间会以 短信 形式通知，请注意查收；</p>
                <p style="line-height: 30px;">6.最终解释权归本公司所有，如有任何问题请联系客服。</p>
            </div>
        </div>
        <!-- Introduction -->
        <div class="product-intro" ng-if="isLoaded && product">
            <div class="intro-header">
                产品详情
            </div>
            <div class="intro-content" style="padding: 0px;" ng-bind-html="(product.abstract || '没有产品详情') | trustHtml">
            </div>
        </div>
        <!-- Submit -->
        <div class="product-submit fixed-bottom active" style="background-color: red; color: #ffffff;" ng-if="isLoaded && product">
            <div class="submit-button" style="background-color: red; color: #ffffff;width:100%;clear: both;opacity: 1;" ng-click="touchPurchase()">
                立即支付预付款{{product.pre_pay/100| currency:"￥"}}
            </div>
        </div>
    </div>
</div>
